/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.goods.entity;

import javax.validation.constraints.NotNull;
import com.jeeplus.modules.orders.entity.Orders;

import com.jeeplus.core.persistence.DataEntity;
import com.jeeplus.common.utils.excel.annotation.ExcelField;
import com.jeeplus.modules.platformcash.entity.PlatformCash;

import java.util.Date;

/**
 * 商品Entity
 * @author freedom
 * @version 2020-09-26
 */
public class Goods extends DataEntity<Goods> {
	
	private static final long serialVersionUID = 1L;
	private String name;		// 商品名称
	private String mainImgs;		// 轮播图
	private Double price;		// 单价
	private String imgs;		// 大图
	private String goodsStatus;		// 商品状态
	private String goodsType;      // 商品类型
	private Orders orders;		// 交易订单

	//前端用  主图
	private String pic;

	//商品初次上架价格
	private Double firstPrice;
	//商品持有人
	private String hostUser;

	//分裂金额
	private Double splitPrice;
	//分裂单数
	private Integer splitAmount;

	//原价
	private Double salePrice;

	private Date beginUpdateDate;		// 开始 创建时间
	private Date endUpdateDate;		// 结束 创建时间

	private PlatformCash platformCash;  //平台收款方式
	
	public Goods() {
		super();
	}

	public Goods(String id){
		super(id);
	}

	@ExcelField(title="商品名称", align=2, sort=1)
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@ExcelField(title="轮播图", align=2, sort=2)
	public String getMainImgs() {
		return mainImgs;
	}

	public void setMainImgs(String mainImgs) {
		this.mainImgs = mainImgs;
	}
	
	@NotNull(message="单价不能为空")
	@ExcelField(title="单价", align=2, sort=3)
	public Double getPrice() {
		return price;
	}

	public void setPrice(Double price) {
		this.price = price;
	}
	
	@ExcelField(title="大图", align=2, sort=4)
	public String getImgs() {
		return imgs;
	}

	public void setImgs(String imgs) {
		this.imgs = imgs;
	}
	
	@ExcelField(title="商品状态", dictType="goodsStatus", align=2, sort=5)
	public String getGoodsStatus() {
		return goodsStatus;
	}

	public void setGoodsStatus(String goodsStatus) {
		this.goodsStatus = goodsStatus;
	}
	
	@ExcelField(title="交易订单", fieldType=Orders.class, value="orders.ordersNo", align=2, sort=6)
	public Orders getOrders() {
		return orders;
	}

	public void setOrders(Orders orders) {
		this.orders = orders;
	}

	public String getGoodsType() {
		return goodsType;
	}

	public void setGoodsType(String goodsType) {
		this.goodsType = goodsType;
	}

	public String getPic() {
		return pic;
	}

	public void setPic(String pic) {
		this.pic = pic;
	}

	public Double getFirstPrice() {
		return firstPrice;
	}

	public void setFirstPrice(Double firstPrice) {
		this.firstPrice = firstPrice;
	}

	@ExcelField(title="持有人", align=2, sort=7)
	public String getHostUser() {
		return hostUser;
	}

	public void setHostUser(String hostUser) {
		this.hostUser = hostUser;
	}

	public Double getSplitPrice() {
		return splitPrice;
	}

	public void setSplitPrice(Double splitPrice) {
		this.splitPrice = splitPrice;
	}

	public Integer getSplitAmount() {
		return splitAmount;
	}

	public void setSplitAmount(Integer splitAmount) {
		this.splitAmount = splitAmount;
	}

	public Double getSalePrice() {
		return salePrice;
	}

	public void setSalePrice(Double salePrice) {
		this.salePrice = salePrice;
	}

	public Date getBeginUpdateDate() {
		return beginUpdateDate;
	}

	public void setBeginUpdateDate(Date beginUpdateDate) {
		this.beginUpdateDate = beginUpdateDate;
	}

	public Date getEndUpdateDate() {
		return endUpdateDate;
	}

	public void setEndUpdateDate(Date endUpdateDate) {
		this.endUpdateDate = endUpdateDate;
	}

	public PlatformCash getPlatformCash() {
		return platformCash;
	}

	public void setPlatformCash(PlatformCash platformCash) {
		this.platformCash = platformCash;
	}
}